@font-face {
    font-family: "Digital-7 Mono";
    src: url("../fonts/digital-7__mono_.eot?") format("eot"), url("../fonts/digital-7__mono_.woff") format("woff"), url("../fonts/digital-7__mono_.ttf") format("truetype"), url("../fonts/digital-7__mono_.svg#Digital-7Mono") format("svg");
    font-weight: normal;
    font-style: normal;
}

html {
    height: 100%;
    background-color: #fff;
}

body {
    min-height: 100%;
    width: 100%;
    font-family: Verdana, Geneva, sans-serif;
    overflow: hidden;
}

body.startview {
}

body.masterview {
    background-color: #51a8fa;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: #333333;
    animation: background-pulse 8s ease-out infinite;
}

#selectPanel {
    margin: 50px;
    flex: 1;
    border-radius: 25px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#selectPanelLogo {
}

#selectPanelLogo > img {
    height: auto;
    width: 45vw;
    max-width: 350px;
    min-width: 250px;
    padding-bottom: 35px;
}

#selectGame {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

select {
    width: 45vw;
    min-width: 250px;
    max-width: 350px;
    height: 50px;
    padding: 5px 35px 5px 5px;
    font-size: 25px;
    border: 1px solid #333;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    color: #333333;
    background: url(../img/downArray.svg) 98% / 10% no-repeat lightgoldenrodyellow;
}

.title {
    font-size: 3vw;
    text-transform: uppercase;
}

#joinPanel {
    flex: 1;

    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#joinPin {
    background-color: #6fc040;
    width: 100%;
    flex: 1;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    font-size: 3vw;
}

#joinPinPin {

}

#pin {
    font-weight: bold;
    font-family: "Courier New", Courier, monospace;
    font-size: 3.6vw;
}

#joinPinUrl {
    margin: 50px;
}

#joinPinUrl span {
    font-size: 2vw;
}

#joinPlayers {
    background-color: #51a8fa;
    width: 100%;

    flex: 5;

    display: flex;
    flex-direction: column;
    align-items: center;
}

#joinPlayersHeader {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

#joinStartContainer {
    height: 24vh;
}

#joinStart {
    margin-top: 40px;
    margin-bottom: 40px;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 5vw;
    color: #fff;
    border-radius: 10px;
}

.start-ready {
    background-color: #fff;
    color: #51a8fa;
    animation: start-pulse 2s ease-in-out infinite;
    cursor: pointer;
}

@keyframes start-pulse {
    0% {
        color: #51a8fa;
        font-size: 6vw;
    }
    25% {
        color: firebrick;
    }
    50% {
        color: #51a8fa;
        font-size: 8vw;
    }
    75% {
        color: firebrick;
    }
    100% {
        color: #51a8fa;
        font-size: 6vw;
    }
}

#joinPlayersTitle {
    font-size: 3vw;
}

/* ellipsis animation*/

.one {
    opacity: 0;
    -webkit-animation: dot 1.3s infinite;
    -webkit-animation-delay: 0.0s;
    animation: dot 1.3s infinite;
    animation-delay: 0.0s;
}

.two {
    opacity: 0;
    -webkit-animation: dot 1.3s infinite;
    -webkit-animation-delay: 0.2s;
    animation: dot 1.3s infinite;
    animation-delay: 0.2s;
}

.three {
    opacity: 0;
    -webkit-animation: dot 1.3s infinite;
    -webkit-animation-delay: 0.3s;
    animation: dot 1.3s infinite;
    animation-delay: 0.3s;
}

@-webkit-keyframes dot {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes dot {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

#players {
    font-size: 2.8vw;
    color: #fff;
    list-style-type: none;

    display: flex;
    flex-flow: row wrap;
    align-items: flex-start;
    justify-content: center;
}

#players li {
    flex: 1 1 20%;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
}

#players li.fadeIn {
    animation-duration: 0.5s;
    animation-name: fadeAndScale;
    animation-timing-function: cubic-bezier(.71, .55, .62, 1.57);
}

@keyframes fadeAndScale {
    from {
        opacity: 0;
        transform: scale(.5, .5) translateX(100%);
    }
    to {
        opacity: 1;
        transform: scale(1, 1) translateX(0%);
    }
}

#questionPanel {
    height: 100vh;

    background-color: lightgoldenrodyellow;
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
}

#questionBottom {
    width: 100%;
}

#questionHeader {
    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

#questionText {
    font-size: 4vw;
    text-align: center;
}

#questionImage {
    margin-top: 5px;
    padding: 0;
    height: 32vh;
    border: 0;
    border-radius: 2px;
}

/* answers */
.answer-grid-wrapper {
    width: 100%;
    height: 50%;
}

.answer-grid-wrapper > div {
    flex: 1;

    display: flex;
    flex-direction: row;
    flex-flow: row wrap;
    align-items: stretch;
    width: 100%;
    height: 100%;
}

.answer-grid-4 > div {
    width: 50%;
    height: 50%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
}

.answer-grid-3 > div {
    width: 33.33%;
    width: calc(100% / 3);
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
}

.answer-grid-2 > div {
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
}

#answer-grid > div > img {
    padding-left: 10px;
}

.answerRed {
    background: firebrick;
}

.answerBlue {
    background: #51a8fa;
}

.answerGreen {
    background: #6fc040;
}

.answerYellow {
    background: #cdd422;
}

.answerText {
    color: #fff;
    font-size: 4vw;
    padding-left: 10px;
}

.answerImage {
    width: 20%
}

#scoresPanel {
    height: 100vh;

    background-color: lightblue;
    color: #000;
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#scoresHeader {
    flex: 1;
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.scoresHeaderText {
    font-size: 5vw;
}

#scoresPlayers {
    flex: 4;
    width: 100%;
    background-color: #51a8fa;

    display: flex;
    flex-direction: row;
    flex-flow: row;
    align-items: flex-start;
    justify-content: center;
}

#scoresPlayers ul {
    width: 60%;
}

#scoresPlayers li {
    font-size: 2.8vw;
    color: whitesmoke;
    list-style-type: none;
    padding-left: 5px;
    padding-right: 5px;
}

#scoresPlayers li.fadeIn {
    animation-duration: 1s;
    animation-name: scoreFadeAndScale;
    animation-timing-function: cubic-bezier(.71, .55, .62, 1.57);
}

@keyframes scoreFadeAndScale {
    from {
        opacity: 0;
        transform: scale(.3, .3) translateY(100%);
    }
    to {
        opacity: 1;
        transform: scale(1, 1) translateY(0%);
    }
}

#scoresPlayers li:nth-child(odd).fadeOut {
    animation-duration: 2s;
    animation-name: scoreFadeOutLeft;
}

#scoresPlayers li:nth-child(even).fadeOut {
    animation-duration: 2s;
    animation-name: scoreFadeOutRight;
}

@keyframes scoreFadeOutLeft {
    from {
        opacity: 1;
        transform: translateX(0%);
        visibility: visible;
    }
    to {
        opacity: 0;
        transform: translateX(100%);
        visibility: hidden;
    }
}

@keyframes scoreFadeOutRight {
    from {
        opacity: 1;
        transform: translateX(0%);
        visibility: visible;
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
        visibility: hidden;
    }
}

.scoreValue {
    float: right;
}

#scoresPlayers li.scoreWinner {
    color: #51a8fa;
    background-color: whitesmoke;
    border-radius: 10px;
    padding: 3px 5px;

    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        color: #51a8fa;
    }
    50% {
        color: firebrick;
    }
    100% {
        color: #51a8fa;
    }
}

@keyframes background-pulse {
    0% {
        background-color: #51a8fa;
    }
    25% {
        background-color: #6fc040;
    }
    50% {
        background-color: #cdd422;
    }
    75% {
        background-color: #B22222;
    }
    100% {
        background-color: #51a8fa;
    }
}

#progressbar {
    background-color: lightgoldenrodyellow;
    margin: 0;
    width: 100%;
}

.pieContainer {
    float: left;
    padding-left: 15px;
    margin-bottom: 10px;
    margin-top: 10px;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.answerCount {
    float: right;
    padding-right: 15px;

    font-family: "Digital-7 Mono", monospace;
    font-size: 6vh;
    color: #08006D;
}

/* */

@keyframes bake-pie {
    from {
        transform: rotate(0deg) translate3d(0, 0, 0);
    }
}

.pieID {
    display: inline-block;
    vertical-align: top;
}

.pie {
    height: 200px;
    width: 200px;
    position: relative;
    margin: 0 30px 30px 0;
}

.pie::before {
    content: "";
    display: block;
    position: absolute;
    z-index: 1;
    width: 100px;
    height: 100px;
    background: #EEE;
    border-radius: 50%;
    top: 50px;
    left: 50px;
}

.pie::after {
    content: "";
    display: block;
    width: 120px;
    height: 2px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    box-shadow: 0 0 3px 4px rgba(0, 0, 0, 0.1);
    margin: 220px auto;

}

.slice {
    position: absolute;
    width: 200px;
    height: 200px;
    clip: rect(0px, 200px, 200px, 100px);
    animation: bake-pie 1s;
}

.slice span {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    background-color: black;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    clip: rect(0px, 200px, 200px, 100px);
}

.legend {
    list-style-type: none;
    margin: 0;
    background: #EEE;
    padding: 15px;
    font-size: 1.8vh;
    box-shadow: 1px 1px 0 #DDD,
    2px 2px 0 #BBB;
}

.legend li {
    height: 1.25em;
    margin-bottom: 0.7em;
    padding-left: 0.5em;
    border-left: 1.25em solid black;
}

.legend em {
    font-style: normal;
}

.legend span {
    float: right;
    padding-left: 10px;
}
